package com.dhl.cloud.core.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.dhl.cloud.common.vdo.ManagingUsersBean;
import com.dhl.cloud.common.vo.ManagingUsersFrontBean;
import com.dhl.cloud.core.entity.UserAndRole;

public interface UserAndRoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserAndRole record);

    int insertSelective(UserAndRole record);

    UserAndRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UserAndRole record);

    int updateByPrimaryKey(UserAndRole record);

    int deleteByUsers(List<String> list);

    int deleteByUser(@Param("username") String username,@Param("tenantid") String tenantid);

    List<UserAndRole> selectRealUsers(String tenantid);

    List<UserAndRole> selectAll();
    
    List<ManagingUsersBean> getUserManageList(ManagingUsersFrontBean managingUser);

    int insertList(List<UserAndRole> list);

    List<UserAndRole> selectByusername(String username);

    List<UserAndRole> selectByusernameAndTenant(@Param("username") String username, @Param("tenantid") String tenantid);

    List<UserAndRole> selectByRoleid(@Param("roleid") Integer roleid);
}